package com.example.pet.service;

import com.example.pet.hystrix.UserServiceHystrix;
import com.hj.pet.model.ReturnT;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.*;

@Component
@FeignClient(name = "pet-user",fallback = UserServiceHystrix.class)
public interface UserService {
    @RequestMapping(value = "/internal/user/login" ,method = RequestMethod.POST)
    @ResponseBody
    public ReturnT<?> login(@RequestParam String userAccount, @RequestParam String userPwd);

    @RequestMapping(value = "/internal/user/registry", method = RequestMethod.POST)
    @ResponseBody
    public boolean registry(@RequestParam String userAccount, @RequestParam String userPwd);
}
